-
Notifications
You must be signed in to change notification settings - Fork 6.8k
make ROIAlign support position-sensitive pooling #13088
Conversation
Thanks for the improvements. Could you add the test case for the new feature? |
@shesung Thanks for your contribution! @mxnet-label-bot [pr-awaiting-review, operator] |
Test case is added and CI failures is fixed. |
src/operator/contrib/roi_align.cc
Outdated
@@ -213,14 +214,21 @@ void ROIAlignForward( | |||
num_threads(engine::OpenMP::Get()->GetRecommendedOMPThreadCount()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From our local test, the better performance will be gained if we move this OMP into n_rois
loop, L160.
Could you help change this and test the performance with your cases? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time complexity of the new case should be the same with the original one. I did the changes as you suggested and test the runtime for both cases. On my server with two E5-2683 v3, this change did bring obvious performance boost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szha to review the API and algorithm change
@shesung thanks for the contribution! |
LGTM. @anirudh2290 @apeforest @samskalicky @azai91 any comments on this PR? |
@shesung thanks for the contribution, could you trigger CI again? |
@shesung could you rebase the code which will trigger the new CI? |
@pengzhao-intel @roywei Some error occurred in jenkins. Do you know how to fix it? |
Seems the problem of connection. Please try to retrigger the CI by adding a space/blank line in the code. |
@wkcn do you mind take a review for this PR? |
There seem to be some bugs in test_operator_gpu.test_poisson_generator which lead to failure of CI. |
Thanks for your contribution! |
@@ -17,6 +17,7 @@ | |||
|
|||
# pylint: skip-file | |||
from __future__ import print_function | |||
from __future__ import division |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The types of variables are specific as float or int.
But it is useful for the consistency of division between py2 and py3.
Hi, @shesung could you try git rebase to the latest master? Some tests may be flaky, usually rebase to latest master or push an empty comit will solve it.
|
src/operator/contrib/roi_align.cc
Outdated
Shape4(bshape[0], dshape[1], param.pooled_size[0], param.pooled_size[1])); | ||
if (param.position_sensitive) { | ||
CHECK_EQ(dshape[1] % (param.pooled_size[0]*param.pooled_size[1]), 0) << | ||
"Input channels shuold be divided by pooled_size[0]*pooled_size[1]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo:shuold -> should
when position_sensitive is true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo:shuold -> should
when position_sensitive is true.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks for your contribution!
@TaoLv could you help take a review and merge PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment. The rest looks good to me. Please re-trigger the CI before merging since the last run is about 6 days ago.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@shesung Thank you for the contribution. I think it's good to merge now. |
* make ROIAlign support position-sensitive pooling * add unittest for RoIAlign op * fix ccplint error * fix python3 compability for unittest * change OMP for better performance * delete blank line to trigger CI * add shape check when position_sensitive is true * fix the typo * typo: shuold -> should * remove private() clause in omp statement
* make ROIAlign support position-sensitive pooling * add unittest for RoIAlign op * fix ccplint error * fix python3 compability for unittest * change OMP for better performance * delete blank line to trigger CI * add shape check when position_sensitive is true * fix the typo * typo: shuold -> should * remove private() clause in omp statement
Description
Modify the RoIAlign operator to support position-sensitive roi pooling.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Comments